import "./index.css";
import Cesium from "modules/base";
import CGos, { Imagery, ImageryType } from "./cgos";
import { Position, CoordTransform } from "./modules/tool";

import Mark from "./modules/component/mark";

var position = {
    lng: 121.49547285402447,
    lat: 31.241381989735093,
};

var center = new Position(121.49547285402447, 31.241381989735093);
let imagery = new Imagery(ImageryType.BAIDU);
let imageryProvider = imagery.create({
    crs: "WGS84",
    style: "midnight",
});

var cgos = new CGos("cesiumContainer", {
    imageryProvider: imageryProvider,
});
cgos.flyTo(center);
//cgos.addModel("/assets/model/box.gltf", center);

var mark = new Mark();
mark.add(cgos._viewer, CoordTransform.WGS84ToCartesian(new Position(position.lng, position.lat, 200)));
